]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appsMenu: Fix initial visibility of "Details" item
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 24 Feb 2019 01:21:56 +0000 (02:21 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Sat, 2 Mar 2019 18:13:38 +0000 (18:13 +0000)
It is only supposed to be visible when Software is installed, but
we currently only update the visibility on changes.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/989

js/ui/panel.js

index 2e2a6592d4d3869daf03b35eeb330a5d41ed907d..1d9621ae388669146cfe5fc374a5c3253a2d734e 100644 (file)
@@ -110,9 +110,14 @@ class AppMenu extends PopupMenu.PopupMenu {
         });
 
         this._appSystem.connect('installed-changed', () => {
-            let sw = this._appSystem.lookup_app('org.gnome.Software.desktop');
-            this._detailsItem.actor.visible = (sw != null);
+            this._updateDetailsVisibility();
         });
+        this._updateDetailsVisibility();
+    }
+
+    _updateDetailsVisibility() {
+        let sw = this._appSystem.lookup_app('org.gnome.Software.desktop');
+        this._detailsItem.actor.visible = (sw != null);
     }
 
     isEmpty() {